<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      v-show="showSearch"
      label-width="80px"
    >
      <el-form-item label="内部订单号" prop="internalOrderNumber">
        <el-input
          v-model="queryParams.internalOrderNumber"
          placeholder="请输入内部订单号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
        <el-button
          :icon="!isOpen ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
          size="mini"
          @click="shouqi"
          >展开/收起</el-button
        >
      </el-form-item>
      <!-- </el-col> -->

      <div v-show="isOpen">
        <el-form-item label="标记多标签" prop="tagMultilabel">
          <el-input
            v-model="queryParams.tagMultilabel"
            placeholder="请输入标记多标签"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="售后单号" prop="saleOrderNumber">
          <el-input
            v-model="queryParams.saleOrderNumber"
            placeholder="请输入售后单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="线上订单号" prop="orderId">
          <el-input
            v-model="queryParams.orderId"
            placeholder="请输入线上订单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="平台外部订单号" prop="externalOrderId">
          <el-input
            v-model="queryParams.externalOrderId"
            placeholder="请输入平台外部订单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="发货仓" prop="shipmentWarehouse">
          <el-input
            v-model="queryParams.shipmentWarehouse"
            placeholder="请输入发货仓"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="虚拟仓" prop="virtualStock">
          <el-input
            v-model="queryParams.virtualStock"
            placeholder="请输入虚拟仓"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="是否预售商品" prop="isPreSaleItem">
          <el-input
            v-model="queryParams.isPreSaleItem"
            placeholder="请输入是否预售商品"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="分销商" prop="distributor">
          <el-input
            v-model="queryParams.distributor"
            placeholder="请输入分销商"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="店铺" prop="storeName">
          <el-input
            v-model="queryParams.storeName"
            placeholder="请输入店铺"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="小旗" prop="flag">
          <el-input
            v-model="queryParams.flag"
            placeholder="请输入小旗"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="买家账号" prop="buyerAccount">
          <el-input
            v-model="queryParams.buyerAccount"
            placeholder="请输入买家账号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="买家ID" prop="buyerId">
          <el-input
            v-model="queryParams.buyerId"
            placeholder="请输入买家ID"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="买家留言" prop="buyerMessage">
          <el-input
            v-model="queryParams.buyerMessage"
            placeholder="请输入买家留言"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="订单日期" prop="orderDate">
          <el-date-picker
            clearable
            v-model="queryParams.orderDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择订单日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="发货日期" prop="shippingDate">
          <el-date-picker
            clearable
            v-model="queryParams.shippingDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择发货日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="付款日期" prop="paymentDate">
          <el-date-picker
            clearable
            v-model="queryParams.paymentDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择付款日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="确认收货日期" prop="confirmationDate">
          <el-date-picker
            clearable
            v-model="queryParams.confirmationDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择确认收货日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="供销支付时间" prop="supplyPaymentTime">
          <el-date-picker
            clearable
            v-model="queryParams.supplyPaymentTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择供销支付时间"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="业务员" prop="salesRepresentativeId">
          <el-input
            v-model="queryParams.salesRepresentativeId"
            placeholder="请输入业务员"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="收货人" prop="receiverName">
          <el-input
            v-model="queryParams.receiverName"
            placeholder="请输入收货人"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="省" prop="province">
          <el-input
            v-model="queryParams.province"
            placeholder="请输入省"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="市" prop="cityName">
          <el-input
            v-model="queryParams.cityName"
            placeholder="请输入市"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="区县" prop="regionCounty">
          <el-input
            v-model="queryParams.regionCounty"
            placeholder="请输入区县"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="快递公司" prop="expressCompany">
          <el-input
            v-model="queryParams.expressCompany"
            placeholder="请输入快递公司"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="快递单号" prop="trackingNumber">
          <el-input
            v-model="queryParams.trackingNumber"
            placeholder="请输入快递单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="售后登记日期" prop="saleAfterRegistrationDate">
          <el-date-picker
            clearable
            v-model="queryParams.saleAfterRegistrationDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择售后登记日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="售后确认日期" prop="serviceConfirmDate">
          <el-date-picker
            clearable
            v-model="queryParams.serviceConfirmDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择售后确认日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="售后进仓日期" prop="saleAfterServiceEntryDate">
          <el-date-picker
            clearable
            v-model="queryParams.saleAfterServiceEntryDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择售后进仓日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item
          label="售后进仓单号"
          prop="salesAfterServiceWarehouseOrderNumber"
        >
          <el-input
            v-model="queryParams.salesAfterServiceWarehouseOrderNumber"
            placeholder="请输入售后进仓单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="售后分类" prop="afterSalesCategory">
          <el-input
            v-model="queryParams.afterSalesCategory"
            placeholder="请输入售后分类"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品编码" prop="productCode">
          <el-input
            v-model="queryParams.productCode"
            placeholder="请输入商品编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="款式编码" prop="styleCode">
          <el-input
            v-model="queryParams.styleCode"
            placeholder="请输入款式编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="原始线上订单号" prop="originalOrderId">
          <el-input
            v-model="queryParams.originalOrderId"
            placeholder="请输入原始线上订单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="虚拟分类" prop="virtualCategory">
          <el-input
            v-model="queryParams.virtualCategory"
            placeholder="请输入虚拟分类"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="产品分类" prop="productCategory">
          <el-input
            v-model="queryParams.productCategory"
            placeholder="请输入产品分类"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="品牌" prop="brand">
          <el-input
            v-model="queryParams.brand"
            placeholder="请输入品牌"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品简称" prop="productShortName">
          <el-input
            v-model="queryParams.productShortName"
            placeholder="请输入商品简称"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品名称" prop="productName">
          <el-input
            v-model="queryParams.productName"
            placeholder="请输入商品名称"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="颜色规格" prop="colorSpecification">
          <el-input
            v-model="queryParams.colorSpecification"
            placeholder="请输入颜色规格"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="线上颜色规格" prop="onlineColorSpecification">
          <el-input
            v-model="queryParams.onlineColorSpecification"
            placeholder="请输入线上颜色规格"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="供应商" prop="supplierName">
          <el-input
            v-model="queryParams.supplierName"
            placeholder="请输入供应商"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="供应商款号" prop="supplierId">
          <el-input
            v-model="queryParams.supplierId"
            placeholder="请输入供应商款号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="供应商商品编码" prop="supplierProductCode">
          <el-input
            v-model="queryParams.supplierProductCode"
            placeholder="请输入供应商商品编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="店铺商品编码" prop="storeProductCode">
          <el-input
            v-model="queryParams.storeProductCode"
            placeholder="请输入店铺商品编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="组合装实体编码" prop="combinationEntityCode">
          <el-input
            v-model="queryParams.combinationEntityCode"
            placeholder="请输入组合装实体编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="基本售价" prop="basePrice">
          <el-input
            v-model="queryParams.basePrice"
            placeholder="请输入基本售价"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="成本价" prop="costPrice">
          <el-input
            v-model="queryParams.costPrice"
            placeholder="请输入成本价"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="销售数量" prop="salesQuantity">
          <el-input
            v-model="queryParams.salesQuantity"
            placeholder="请输入销售数量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="赠品数量" prop="giftQuantity">
          <el-input
            v-model="queryParams.giftQuantity"
            placeholder="请输入赠品数量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="价格为零的商品数量" prop="zeroPriceItemCount">
          <el-input
            v-model="queryParams.zeroPriceItemCount"
            placeholder="请输入价格为零的商品数量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="实发数量" prop="actualQuantity">
          <el-input
            v-model="queryParams.actualQuantity"
            placeholder="请输入实发数量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="实发金额" prop="actualAmount">
          <el-input
            v-model="queryParams.actualAmount"
            placeholder="请输入实发金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="销售金额" prop="salesAmount">
          <el-input
            v-model="queryParams.salesAmount"
            placeholder="请输入销售金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="销售成本" prop="salesCost">
          <el-input
            v-model="queryParams.salesCost"
            placeholder="请输入销售成本"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="实发成本" prop="actualCost">
          <el-input
            v-model="queryParams.actualCost"
            placeholder="请输入实发成本"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="销售毛利" prop="salesGrossProfit">
          <el-input
            v-model="queryParams.salesGrossProfit"
            placeholder="请输入销售毛利"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="销售毛利率" prop="salesGrossMarginRate">
          <el-input
            v-model="queryParams.salesGrossMarginRate"
            placeholder="请输入销售毛利率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="已付金额" prop="paidAmount">
          <el-input
            v-model="queryParams.paidAmount"
            placeholder="请输入已付金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="应付金额" prop="dueAmount">
          <el-input
            v-model="queryParams.dueAmount"
            placeholder="请输入应付金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="售价" prop="salePrice">
          <el-input
            v-model="queryParams.salePrice"
            placeholder="请输入售价"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="基本金额" prop="basicAmount">
          <el-input
            v-model="queryParams.basicAmount"
            placeholder="请输入基本金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="退货数量" prop="returnQuantity">
          <el-input
            v-model="queryParams.returnQuantity"
            placeholder="请输入退货数量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="实退数量" prop="actualReturnQuantity">
          <el-input
            v-model="queryParams.actualReturnQuantity"
            placeholder="请输入实退数量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="退货金额" prop="returnAmount">
          <el-input
            v-model="queryParams.returnAmount"
            placeholder="请输入退货金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="退货成本" prop="returnCost">
          <el-input
            v-model="queryParams.returnCost"
            placeholder="请输入退货成本"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="实退成本" prop="actualReimbursementCost">
          <el-input
            v-model="queryParams.actualReimbursementCost"
            placeholder="请输入实退成本"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="实退金额" prop="actualWithdrawAmount">
          <el-input
            v-model="queryParams.actualWithdrawAmount"
            placeholder="请输入实退金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="运费收入" prop="freightIncome">
          <el-input
            v-model="queryParams.freightIncome"
            placeholder="请输入运费收入"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="运费收入分摊" prop="shippingFeeRevenueAllocation">
          <el-input
            v-model="queryParams.shippingFeeRevenueAllocation"
            placeholder="请输入运费收入分摊"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="运费支出" prop="freightExpense">
          <el-input
            v-model="queryParams.freightExpense"
            placeholder="请输入运费支出"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="运费支出分摊" prop="freightExpenseAllocation">
          <el-input
            v-model="queryParams.freightExpenseAllocation"
            placeholder="请输入运费支出分摊"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="优惠金额" prop="discountAmount">
          <el-input
            v-model="queryParams.discountAmount"
            placeholder="请输入优惠金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="订单重量" prop="orderWeight">
          <el-input
            v-model="queryParams.orderWeight"
            placeholder="请输入订单重量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="订单商品重量" prop="orderItemWeight">
          <el-input
            v-model="queryParams.orderItemWeight"
            placeholder="请输入订单商品重量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商店站点" prop="storeLocation">
          <el-input
            v-model="queryParams.storeLocation"
            placeholder="请输入商店站点"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="订单来源" prop="orderSource">
          <el-input
            v-model="queryParams.orderSource"
            placeholder="请输入订单来源"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="便签" prop="noteTag">
          <el-input
            v-model="queryParams.noteTag"
            placeholder="请输入便签"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它价格1" prop="otherPrice1">
          <el-input
            v-model="queryParams.otherPrice1"
            placeholder="请输入其它价格1"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它价格2" prop="otherPrice2">
          <el-input
            v-model="queryParams.otherPrice2"
            placeholder="请输入其它价格2"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它价格3" prop="otherPrice3">
          <el-input
            v-model="queryParams.otherPrice3"
            placeholder="请输入其它价格3"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它价格4" prop="otherPrice4">
          <el-input
            v-model="queryParams.otherPrice4"
            placeholder="请输入其它价格4"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它价格5" prop="otherPrice5">
          <el-input
            v-model="queryParams.otherPrice5"
            placeholder="请输入其它价格5"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它属性1" prop="otherAttribute1">
          <el-input
            v-model="queryParams.otherAttribute1"
            placeholder="请输入其它属性1"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它属性2" prop="otherAttribute2">
          <el-input
            v-model="queryParams.otherAttribute2"
            placeholder="请输入其它属性2"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它属性3" prop="otherAttribute3">
          <el-input
            v-model="queryParams.otherAttribute3"
            placeholder="请输入其它属性3"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它属性4" prop="otherAttribute4">
          <el-input
            v-model="queryParams.otherAttribute4"
            placeholder="请输入其它属性4"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="其它属性5" prop="otherAttribute5">
          <el-input
            v-model="queryParams.otherAttribute5"
            placeholder="请输入其它属性5"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="店铺编号" prop="shopId">
          <el-input
            v-model="queryParams.shopId"
            placeholder="请输入店铺编号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="线上商品名" prop="onlineProductName">
          <el-input
            v-model="queryParams.onlineProductName"
            placeholder="请输入线上商品名"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="组合装商品编码" prop="combinedProductCode">
          <el-input
            v-model="queryParams.combinedProductCode"
            placeholder="请输入组合装商品编码"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="线上子订单编号" prop="orderSubId">
          <el-input
            v-model="queryParams.orderSubId"
            placeholder="请输入线上子订单编号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="出仓单号" prop="warehouseOrderNumber">
          <el-input
            v-model="queryParams.warehouseOrderNumber"
            placeholder="请输入出仓单号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="优惠券名称" prop="couponName">
          <el-input
            v-model="queryParams.couponName"
            placeholder="请输入优惠券名称"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品资料设置重量" prop="productWeight">
          <el-input
            v-model="queryParams.productWeight"
            placeholder="请输入商品资料设置重量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
      </div>
      <!-- <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item> -->
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['jst:JstOrigOrderDwd:add']"
          >新增</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['jst:JstOrigOrderDwd:edit']"
          >修改</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['jst:JstOrigOrderDwd:remove']"
          >删除</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['jst:JstOrigOrderDwd:export']"
          >导出</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button size="mini" plain icon="el-icon-upload" @click="daoru"
          >导入</el-button
        >
      </el-col>
      <right-toolbar
        :showSearch.sync="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>

    <el-table
      v-loading="loading"
      :data="JstOrigOrderDwdList"
      @selection-change="handleSelectionChange"
      :height="630"
    >
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="id" align="center" prop="id" />
      <el-table-column
        label="内部订单号"
        align="center"
        prop="internalOrderNumber"
      />
      <el-table-column label="标记多标签" align="center" prop="tagMultilabel">
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.tagMultilabel" />
        </template>
      </el-table-column>
      <el-table-column label="售后单号" align="center" prop="saleOrderNumber" />
      <el-table-column label="订单类型" align="center" prop="orderType" />
      <el-table-column label="线上订单号" align="center" prop="orderId">
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.orderId" />
        </template>
      </el-table-column>
      <el-table-column
        label="平台外部订单号"
        align="center"
        prop="externalOrderId"
      />
      <el-table-column label="订单状态" align="center" prop="orderStatus" />
      <el-table-column label="发货仓" align="center" prop="shipmentWarehouse" />
      <el-table-column label="虚拟仓" align="center" prop="virtualStock" />
      <el-table-column
        label="是否预售商品"
        align="center"
        prop="isPreSaleItem"
      />
      <el-table-column label="分销商" align="center" prop="distributor" />
      <el-table-column label="店铺" align="center" prop="storeName" />
      <el-table-column label="小旗" align="center" prop="flag" />
      <el-table-column label="买家账号" align="center" prop="buyerAccount">
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.buyerAccount" />
        </template>
      </el-table-column>
      <el-table-column label="买家ID" align="center" prop="buyerId" />
      <el-table-column label="买家留言" align="center" prop="buyerMessage" />
      <el-table-column label="卖家备注" align="center" prop="sellerNote">
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.sellerNote" />
        </template>
      </el-table-column>
      <el-table-column
        label="订单日期"
        align="center"
        prop="orderDate"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.orderDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="发货日期"
        align="center"
        prop="shippingDate"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.shippingDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="付款日期"
        align="center"
        prop="paymentDate"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.paymentDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="确认收货日期"
        align="center"
        prop="confirmationDate"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.confirmationDate, "{y}-{m}-{d}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="供销支付时间"
        align="center"
        prop="supplyPaymentTime"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.supplyPaymentTime, "{y}-{m}-{d}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="业务员"
        align="center"
        prop="salesRepresentativeId"
      />
      <el-table-column label="收货人" align="center" prop="receiverName" />
      <el-table-column label="省" align="center" prop="province" />
      <el-table-column label="市" align="center" prop="cityName" />
      <el-table-column label="区县" align="center" prop="regionCounty" />
      <el-table-column label="快递公司" align="center" prop="expressCompany" />
      <el-table-column label="快递单号" align="center" prop="trackingNumber" />
      <el-table-column
        label="售后登记日期"
        align="center"
        prop="saleAfterRegistrationDate"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.saleAfterRegistrationDate, "{y}-{m}-{d}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="售后确认日期"
        align="center"
        prop="serviceConfirmDate"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.serviceConfirmDate, "{y}-{m}-{d}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="售后进仓日期"
        align="center"
        prop="saleAfterServiceEntryDate"
        width="180"
      >
        <template slot-scope="scope">
          <span>{{
            parseTime(scope.row.saleAfterServiceEntryDate, "{y}-{m}-{d}")
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="售后进仓单号"
        align="center"
        prop="salesAfterServiceWarehouseOrderNumber"
      />
      <el-table-column
        label="售后分类"
        align="center"
        prop="afterSalesCategory"
      />
      <el-table-column label="问题类型" align="center" prop="issueType" />
      <el-table-column label="商品编码" align="center" prop="productCode" />
      <el-table-column label="款式编码" align="center" prop="styleCode" />
      <el-table-column
        label="原始线上订单号"
        align="center"
        prop="originalOrderId"
      />
      <el-table-column label="虚拟分类" align="center" prop="virtualCategory" />
      <el-table-column label="产品分类" align="center" prop="productCategory" />
      <el-table-column label="品牌" align="center" prop="brand" />
      <el-table-column
        label="商品简称"
        align="center"
        prop="productShortName"
      />
      <el-table-column label="商品名称" align="center" prop="productName" />
      <el-table-column
        label="颜色规格"
        align="center"
        prop="colorSpecification"
      />
      <el-table-column
        label="线上颜色规格"
        align="center"
        prop="onlineColorSpecification"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.onlineColorSpecification" />
        </template>
      </el-table-column>
      <el-table-column label="供应商" align="center" prop="supplierName" />
      <el-table-column label="供应商款号" align="center" prop="supplierId" />
      <el-table-column
        label="供应商商品编码"
        align="center"
        prop="supplierProductCode"
      />
      <el-table-column
        label="店铺商品编码"
        align="center"
        prop="storeProductCode"
      />
      <el-table-column
        label="组合装实体编码"
        align="center"
        prop="combinationEntityCode"
      />
      <el-table-column label="基本售价" align="center" prop="basePrice" />
      <el-table-column label="成本价" align="center" prop="costPrice" />
      <el-table-column label="销售数量" align="center" prop="salesQuantity" />
      <el-table-column label="赠品数量" align="center" prop="giftQuantity" />
      <el-table-column
        label="价格为零的商品数量"
        align="center"
        prop="zeroPriceItemCount"
      />
      <el-table-column label="实发数量" align="center" prop="actualQuantity" />
      <el-table-column label="实发金额" align="center" prop="actualAmount" />
      <el-table-column label="销售金额" align="center" prop="salesAmount" />
      <el-table-column label="销售成本" align="center" prop="salesCost" />
      <el-table-column label="实发成本" align="center" prop="actualCost" />
      <el-table-column
        label="销售毛利"
        align="center"
        prop="salesGrossProfit"
      />
      <el-table-column
        label="销售毛利率"
        align="center"
        prop="salesGrossMarginRate"
      />
      <el-table-column label="已付金额" align="center" prop="paidAmount" />
      <el-table-column label="应付金额" align="center" prop="dueAmount" />
      <el-table-column label="售价" align="center" prop="salePrice" />
      <el-table-column label="基本金额" align="center" prop="basicAmount" />
      <el-table-column label="退货数量" align="center" prop="returnQuantity" />
      <el-table-column
        label="实退数量"
        align="center"
        prop="actualReturnQuantity"
      />
      <el-table-column label="退货金额" align="center" prop="returnAmount" />
      <el-table-column label="退货成本" align="center" prop="returnCost" />
      <el-table-column
        label="实退成本"
        align="center"
        prop="actualReimbursementCost"
      />
      <el-table-column
        label="实退金额"
        align="center"
        prop="actualWithdrawAmount"
      />
      <el-table-column label="运费收入" align="center" prop="freightIncome" />
      <el-table-column
        label="运费收入分摊"
        align="center"
        prop="shippingFeeRevenueAllocation"
      />
      <el-table-column label="运费支出" align="center" prop="freightExpense" />
      <el-table-column
        label="运费支出分摊"
        align="center"
        prop="freightExpenseAllocation"
      />
      <el-table-column label="优惠金额" align="center" prop="discountAmount" />
      <el-table-column label="订单重量" align="center" prop="orderWeight" />
      <el-table-column
        label="订单商品重量"
        align="center"
        prop="orderItemWeight"
      />
      <el-table-column label="商店站点" align="center" prop="storeLocation" />
      <el-table-column label="订单来源" align="center" prop="orderSource" />
      <el-table-column label="便签" align="center" prop="noteTag" />
      <el-table-column label="其它价格1" align="center" prop="otherPrice1" />
      <el-table-column label="其它价格2" align="center" prop="otherPrice2" />
      <el-table-column label="其它价格3" align="center" prop="otherPrice3" />
      <el-table-column label="其它价格4" align="center" prop="otherPrice4" />
      <el-table-column label="其它价格5" align="center" prop="otherPrice5" />
      <el-table-column
        label="其它属性1"
        align="center"
        prop="otherAttribute1"
      />
      <el-table-column
        label="其它属性2"
        align="center"
        prop="otherAttribute2"
      />
      <el-table-column
        label="其它属性3"
        align="center"
        prop="otherAttribute3"
      />
      <el-table-column
        label="其它属性4"
        align="center"
        prop="otherAttribute4"
      />
      <el-table-column
        label="其它属性5"
        align="center"
        prop="otherAttribute5"
      />
      <el-table-column label="店铺编号" align="center" prop="shopId" />
      <el-table-column
        label="线上商品名"
        align="center"
        prop="onlineProductName"
      >
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.onlineProductName" /> </template
      ></el-table-column>
      <el-table-column
        label="组合装商品编码"
        align="center"
        prop="combinedProductCode"
      />
      <el-table-column
        label="线上子订单编号"
        align="center"
        prop="orderSubId"
      />
      <el-table-column
        label="出仓单号"
        align="center"
        prop="warehouseOrderNumber"
      />
      <el-table-column label="优惠券名称" align="center" prop="couponName">
        <template slot-scope="scope">
          <mypopover :popoverInput="scope.row.couponName" /> </template
      ></el-table-column>
      <el-table-column
        label="商品资料设置重量"
        align="center"
        prop="productWeight"
      />
      <el-table-column
        label="操作"
        align="center"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['jst:JstOrigOrderDwd:edit']"
            >修改</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['jst:JstOrigOrderDwd:remove']"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改原始订单数据对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="内部订单号" prop="internalOrderNumber">
          <el-input
            v-model="form.internalOrderNumber"
            placeholder="请输入内部订单号"
          />
        </el-form-item>
        <el-form-item label="标记多标签" prop="tagMultilabel">
          <el-input
            v-model="form.tagMultilabel"
            placeholder="请输入标记多标签"
          />
        </el-form-item>
        <el-form-item label="售后单号" prop="saleOrderNumber">
          <el-input
            v-model="form.saleOrderNumber"
            placeholder="请输入售后单号"
          />
        </el-form-item>
        <el-form-item label="线上订单号" prop="orderId">
          <el-input v-model="form.orderId" placeholder="请输入线上订单号" />
        </el-form-item>
        <el-form-item label="平台外部订单号" prop="externalOrderId">
          <el-input
            v-model="form.externalOrderId"
            placeholder="请输入平台外部订单号"
          />
        </el-form-item>
        <el-form-item label="发货仓" prop="shipmentWarehouse">
          <el-input
            v-model="form.shipmentWarehouse"
            placeholder="请输入发货仓"
          />
        </el-form-item>
        <el-form-item label="虚拟仓" prop="virtualStock">
          <el-input v-model="form.virtualStock" placeholder="请输入虚拟仓" />
        </el-form-item>
        <el-form-item label="是否预售商品" prop="isPreSaleItem">
          <el-input
            v-model="form.isPreSaleItem"
            placeholder="请输入是否预售商品"
          />
        </el-form-item>
        <el-form-item label="分销商" prop="distributor">
          <el-input v-model="form.distributor" placeholder="请输入分销商" />
        </el-form-item>
        <el-form-item label="店铺" prop="storeName">
          <el-input v-model="form.storeName" placeholder="请输入店铺" />
        </el-form-item>
        <el-form-item label="小旗" prop="flag">
          <el-input v-model="form.flag" placeholder="请输入小旗" />
        </el-form-item>
        <el-form-item label="买家账号" prop="buyerAccount">
          <el-input v-model="form.buyerAccount" placeholder="请输入买家账号" />
        </el-form-item>
        <el-form-item label="买家ID" prop="buyerId">
          <el-input v-model="form.buyerId" placeholder="请输入买家ID" />
        </el-form-item>
        <el-form-item label="买家留言" prop="buyerMessage">
          <el-input v-model="form.buyerMessage" placeholder="请输入买家留言" />
        </el-form-item>
        <el-form-item label="卖家备注" prop="sellerNote">
          <el-input
            v-model="form.sellerNote"
            type="textarea"
            placeholder="请输入内容"
          />
        </el-form-item>
        <el-form-item label="订单日期" prop="orderDate">
          <el-date-picker
            clearable
            v-model="form.orderDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择订单日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="发货日期" prop="shippingDate">
          <el-date-picker
            clearable
            v-model="form.shippingDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择发货日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="付款日期" prop="paymentDate">
          <el-date-picker
            clearable
            v-model="form.paymentDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择付款日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="确认收货日期" prop="confirmationDate">
          <el-date-picker
            clearable
            v-model="form.confirmationDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择确认收货日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="供销支付时间" prop="supplyPaymentTime">
          <el-date-picker
            clearable
            v-model="form.supplyPaymentTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择供销支付时间"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="业务员" prop="salesRepresentativeId">
          <el-input
            v-model="form.salesRepresentativeId"
            placeholder="请输入业务员"
          />
        </el-form-item>
        <el-form-item label="收货人" prop="receiverName">
          <el-input v-model="form.receiverName" placeholder="请输入收货人" />
        </el-form-item>
        <el-form-item label="省" prop="province">
          <el-input v-model="form.province" placeholder="请输入省" />
        </el-form-item>
        <el-form-item label="市" prop="cityName">
          <el-input v-model="form.cityName" placeholder="请输入市" />
        </el-form-item>
        <el-form-item label="区县" prop="regionCounty">
          <el-input v-model="form.regionCounty" placeholder="请输入区县" />
        </el-form-item>
        <el-form-item label="快递公司" prop="expressCompany">
          <el-input
            v-model="form.expressCompany"
            placeholder="请输入快递公司"
          />
        </el-form-item>
        <el-form-item label="快递单号" prop="trackingNumber">
          <el-input
            v-model="form.trackingNumber"
            placeholder="请输入快递单号"
          />
        </el-form-item>
        <el-form-item label="售后登记日期" prop="saleAfterRegistrationDate">
          <el-date-picker
            clearable
            v-model="form.saleAfterRegistrationDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择售后登记日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="售后确认日期" prop="serviceConfirmDate">
          <el-date-picker
            clearable
            v-model="form.serviceConfirmDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择售后确认日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="售后进仓日期" prop="saleAfterServiceEntryDate">
          <el-date-picker
            clearable
            v-model="form.saleAfterServiceEntryDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择售后进仓日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item
          label="售后进仓单号"
          prop="salesAfterServiceWarehouseOrderNumber"
        >
          <el-input
            v-model="form.salesAfterServiceWarehouseOrderNumber"
            placeholder="请输入售后进仓单号"
          />
        </el-form-item>
        <el-form-item label="售后分类" prop="afterSalesCategory">
          <el-input
            v-model="form.afterSalesCategory"
            placeholder="请输入售后分类"
          />
        </el-form-item>
        <el-form-item label="商品编码" prop="productCode">
          <el-input v-model="form.productCode" placeholder="请输入商品编码" />
        </el-form-item>
        <el-form-item label="款式编码" prop="styleCode">
          <el-input v-model="form.styleCode" placeholder="请输入款式编码" />
        </el-form-item>
        <el-form-item label="原始线上订单号" prop="originalOrderId">
          <el-input
            v-model="form.originalOrderId"
            placeholder="请输入原始线上订单号"
          />
        </el-form-item>
        <el-form-item label="虚拟分类" prop="virtualCategory">
          <el-input
            v-model="form.virtualCategory"
            placeholder="请输入虚拟分类"
          />
        </el-form-item>
        <el-form-item label="产品分类" prop="productCategory">
          <el-input
            v-model="form.productCategory"
            placeholder="请输入产品分类"
          />
        </el-form-item>
        <el-form-item label="品牌" prop="brand">
          <el-input v-model="form.brand" placeholder="请输入品牌" />
        </el-form-item>
        <el-form-item label="商品简称" prop="productShortName">
          <el-input
            v-model="form.productShortName"
            placeholder="请输入商品简称"
          />
        </el-form-item>
        <el-form-item label="商品名称" prop="productName">
          <el-input v-model="form.productName" placeholder="请输入商品名称" />
        </el-form-item>
        <el-form-item label="颜色规格" prop="colorSpecification">
          <el-input
            v-model="form.colorSpecification"
            placeholder="请输入颜色规格"
          />
        </el-form-item>
        <el-form-item label="线上颜色规格" prop="onlineColorSpecification">
          <el-input
            v-model="form.onlineColorSpecification"
            placeholder="请输入线上颜色规格"
          />
        </el-form-item>
        <el-form-item label="供应商" prop="supplierName">
          <el-input v-model="form.supplierName" placeholder="请输入供应商" />
        </el-form-item>
        <el-form-item label="供应商款号" prop="supplierId">
          <el-input v-model="form.supplierId" placeholder="请输入供应商款号" />
        </el-form-item>
        <el-form-item label="供应商商品编码" prop="supplierProductCode">
          <el-input
            v-model="form.supplierProductCode"
            placeholder="请输入供应商商品编码"
          />
        </el-form-item>
        <el-form-item label="店铺商品编码" prop="storeProductCode">
          <el-input
            v-model="form.storeProductCode"
            placeholder="请输入店铺商品编码"
          />
        </el-form-item>
        <el-form-item label="组合装实体编码" prop="combinationEntityCode">
          <el-input
            v-model="form.combinationEntityCode"
            placeholder="请输入组合装实体编码"
          />
        </el-form-item>
        <el-form-item label="基本售价" prop="basePrice">
          <el-input v-model="form.basePrice" placeholder="请输入基本售价" />
        </el-form-item>
        <el-form-item label="成本价" prop="costPrice">
          <el-input v-model="form.costPrice" placeholder="请输入成本价" />
        </el-form-item>
        <el-form-item label="销售数量" prop="salesQuantity">
          <el-input v-model="form.salesQuantity" placeholder="请输入销售数量" />
        </el-form-item>
        <el-form-item label="赠品数量" prop="giftQuantity">
          <el-input v-model="form.giftQuantity" placeholder="请输入赠品数量" />
        </el-form-item>
        <el-form-item label="价格为零的商品数量" prop="zeroPriceItemCount">
          <el-input
            v-model="form.zeroPriceItemCount"
            placeholder="请输入价格为零的商品数量"
          />
        </el-form-item>
        <el-form-item label="实发数量" prop="actualQuantity">
          <el-input
            v-model="form.actualQuantity"
            placeholder="请输入实发数量"
          />
        </el-form-item>
        <el-form-item label="实发金额" prop="actualAmount">
          <el-input v-model="form.actualAmount" placeholder="请输入实发金额" />
        </el-form-item>
        <el-form-item label="销售金额" prop="salesAmount">
          <el-input v-model="form.salesAmount" placeholder="请输入销售金额" />
        </el-form-item>
        <el-form-item label="销售成本" prop="salesCost">
          <el-input v-model="form.salesCost" placeholder="请输入销售成本" />
        </el-form-item>
        <el-form-item label="实发成本" prop="actualCost">
          <el-input v-model="form.actualCost" placeholder="请输入实发成本" />
        </el-form-item>
        <el-form-item label="销售毛利" prop="salesGrossProfit">
          <el-input
            v-model="form.salesGrossProfit"
            placeholder="请输入销售毛利"
          />
        </el-form-item>
        <el-form-item label="销售毛利率" prop="salesGrossMarginRate">
          <el-input
            v-model="form.salesGrossMarginRate"
            placeholder="请输入销售毛利率"
          />
        </el-form-item>
        <el-form-item label="已付金额" prop="paidAmount">
          <el-input v-model="form.paidAmount" placeholder="请输入已付金额" />
        </el-form-item>
        <el-form-item label="应付金额" prop="dueAmount">
          <el-input v-model="form.dueAmount" placeholder="请输入应付金额" />
        </el-form-item>
        <el-form-item label="售价" prop="salePrice">
          <el-input v-model="form.salePrice" placeholder="请输入售价" />
        </el-form-item>
        <el-form-item label="基本金额" prop="basicAmount">
          <el-input v-model="form.basicAmount" placeholder="请输入基本金额" />
        </el-form-item>
        <el-form-item label="退货数量" prop="returnQuantity">
          <el-input
            v-model="form.returnQuantity"
            placeholder="请输入退货数量"
          />
        </el-form-item>
        <el-form-item label="实退数量" prop="actualReturnQuantity">
          <el-input
            v-model="form.actualReturnQuantity"
            placeholder="请输入实退数量"
          />
        </el-form-item>
        <el-form-item label="退货金额" prop="returnAmount">
          <el-input v-model="form.returnAmount" placeholder="请输入退货金额" />
        </el-form-item>
        <el-form-item label="退货成本" prop="returnCost">
          <el-input v-model="form.returnCost" placeholder="请输入退货成本" />
        </el-form-item>
        <el-form-item label="实退成本" prop="actualReimbursementCost">
          <el-input
            v-model="form.actualReimbursementCost"
            placeholder="请输入实退成本"
          />
        </el-form-item>
        <el-form-item label="实退金额" prop="actualWithdrawAmount">
          <el-input
            v-model="form.actualWithdrawAmount"
            placeholder="请输入实退金额"
          />
        </el-form-item>
        <el-form-item label="运费收入" prop="freightIncome">
          <el-input v-model="form.freightIncome" placeholder="请输入运费收入" />
        </el-form-item>
        <el-form-item label="运费收入分摊" prop="shippingFeeRevenueAllocation">
          <el-input
            v-model="form.shippingFeeRevenueAllocation"
            placeholder="请输入运费收入分摊"
          />
        </el-form-item>
        <el-form-item label="运费支出" prop="freightExpense">
          <el-input
            v-model="form.freightExpense"
            placeholder="请输入运费支出"
          />
        </el-form-item>
        <el-form-item label="运费支出分摊" prop="freightExpenseAllocation">
          <el-input
            v-model="form.freightExpenseAllocation"
            placeholder="请输入运费支出分摊"
          />
        </el-form-item>
        <el-form-item label="优惠金额" prop="discountAmount">
          <el-input
            v-model="form.discountAmount"
            placeholder="请输入优惠金额"
          />
        </el-form-item>
        <el-form-item label="订单重量" prop="orderWeight">
          <el-input v-model="form.orderWeight" placeholder="请输入订单重量" />
        </el-form-item>
        <el-form-item label="订单商品重量" prop="orderItemWeight">
          <el-input
            v-model="form.orderItemWeight"
            placeholder="请输入订单商品重量"
          />
        </el-form-item>
        <el-form-item label="商店站点" prop="storeLocation">
          <el-input v-model="form.storeLocation" placeholder="请输入商店站点" />
        </el-form-item>
        <el-form-item label="订单来源" prop="orderSource">
          <el-input v-model="form.orderSource" placeholder="请输入订单来源" />
        </el-form-item>
        <el-form-item label="便签" prop="noteTag">
          <el-input v-model="form.noteTag" placeholder="请输入便签" />
        </el-form-item>
        <el-form-item label="其它价格1" prop="otherPrice1">
          <el-input v-model="form.otherPrice1" placeholder="请输入其它价格1" />
        </el-form-item>
        <el-form-item label="其它价格2" prop="otherPrice2">
          <el-input v-model="form.otherPrice2" placeholder="请输入其它价格2" />
        </el-form-item>
        <el-form-item label="其它价格3" prop="otherPrice3">
          <el-input v-model="form.otherPrice3" placeholder="请输入其它价格3" />
        </el-form-item>
        <el-form-item label="其它价格4" prop="otherPrice4">
          <el-input v-model="form.otherPrice4" placeholder="请输入其它价格4" />
        </el-form-item>
        <el-form-item label="其它价格5" prop="otherPrice5">
          <el-input v-model="form.otherPrice5" placeholder="请输入其它价格5" />
        </el-form-item>
        <el-form-item label="其它属性1" prop="otherAttribute1">
          <el-input
            v-model="form.otherAttribute1"
            placeholder="请输入其它属性1"
          />
        </el-form-item>
        <el-form-item label="其它属性2" prop="otherAttribute2">
          <el-input
            v-model="form.otherAttribute2"
            placeholder="请输入其它属性2"
          />
        </el-form-item>
        <el-form-item label="其它属性3" prop="otherAttribute3">
          <el-input
            v-model="form.otherAttribute3"
            placeholder="请输入其它属性3"
          />
        </el-form-item>
        <el-form-item label="其它属性4" prop="otherAttribute4">
          <el-input
            v-model="form.otherAttribute4"
            placeholder="请输入其它属性4"
          />
        </el-form-item>
        <el-form-item label="其它属性5" prop="otherAttribute5">
          <el-input
            v-model="form.otherAttribute5"
            placeholder="请输入其它属性5"
          />
        </el-form-item>
        <el-form-item label="店铺编号" prop="shopId">
          <el-input v-model="form.shopId" placeholder="请输入店铺编号" />
        </el-form-item>
        <el-form-item label="线上商品名" prop="onlineProductName">
          <el-input
            v-model="form.onlineProductName"
            placeholder="请输入线上商品名"
          />
        </el-form-item>
        <el-form-item label="组合装商品编码" prop="combinedProductCode">
          <el-input
            v-model="form.combinedProductCode"
            placeholder="请输入组合装商品编码"
          />
        </el-form-item>
        <el-form-item label="线上子订单编号" prop="orderSubId">
          <el-input
            v-model="form.orderSubId"
            placeholder="请输入线上子订单编号"
          />
        </el-form-item>
        <el-form-item label="出仓单号" prop="warehouseOrderNumber">
          <el-input
            v-model="form.warehouseOrderNumber"
            placeholder="请输入出仓单号"
          />
        </el-form-item>
        <el-form-item label="优惠券名称" prop="couponName">
          <el-input v-model="form.couponName" placeholder="请输入优惠券名称" />
        </el-form-item>
        <el-form-item label="商品资料设置重量" prop="productWeight">
          <el-input
            v-model="form.productWeight"
            placeholder="请输入商品资料设置重量"
          />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog
      :title="title"
      :visible.sync="dialogVisible"
      width="500px"
      append-to-body
      v-if="dialogVisible"
    >
      <el-upload
        :action="Upload.url"
        :headers="Upload.headers"
        :limit="limit"
        :on-exceed="handleExceed"
        :on-success="handlePictureSuccessPic"
        :before-upload="beforeAvatarUpload"
        :file-list="fileLi"
        :on-change="changeFile1"
      >
        <el-button size="small" type="primary">导入文件</el-button>

        <!-- <i class="el-icon-plus"></i> -->
      </el-upload>
    </el-dialog>
  </div>
</template>

<script>
import {
  listJstOrigOrderDwd,
  getJstOrigOrderDwd,
  delJstOrigOrderDwd,
  addJstOrigOrderDwd,
  updateJstOrigOrderDwd,
} from "@/api/jst/JstOrigOrderDwd";
//--------导入token
import { getToken } from "@/utils/auth";
export default {
  name: "JstOrigOrderDwd",
  data() {
    return {
      pjtUrl: process.env.VUE_APP_BASE_API,
      fileLi: [],
      file: "",
      dialogVisible: false,
      // 图片数量限制
      limit: 2,
      Upload: {
        // 设置上传的请求头部
        headers: {
          Authorization: "Bearer " + getToken(),
        },
        // 图片上传的方法地址:
        url: process.env.VUE_APP_BASE_API + "/jst/JstOrigOrderDwd/importData",
      },
      isOpen: false,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 原始订单数据表格数据
      JstOrigOrderDwdList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        internalOrderNumber: null,
        tagMultilabel: null,
        saleOrderNumber: null,
        orderType: null,
        orderId: null,
        externalOrderId: null,
        orderStatus: null,
        shipmentWarehouse: null,
        virtualStock: null,
        isPreSaleItem: null,
        distributor: null,
        storeName: null,
        flag: null,
        buyerAccount: null,
        buyerId: null,
        buyerMessage: null,
        sellerNote: null,
        orderDate: null,
        shippingDate: null,
        paymentDate: null,
        confirmationDate: null,
        supplyPaymentTime: null,
        salesRepresentativeId: null,
        receiverName: null,
        province: null,
        cityName: null,
        regionCounty: null,
        expressCompany: null,
        trackingNumber: null,
        saleAfterRegistrationDate: null,
        serviceConfirmDate: null,
        saleAfterServiceEntryDate: null,
        salesAfterServiceWarehouseOrderNumber: null,
        afterSalesCategory: null,
        issueType: null,
        productCode: null,
        styleCode: null,
        originalOrderId: null,
        virtualCategory: null,
        productCategory: null,
        brand: null,
        productShortName: null,
        productName: null,
        colorSpecification: null,
        onlineColorSpecification: null,
        supplierName: null,
        supplierId: null,
        supplierProductCode: null,
        storeProductCode: null,
        combinationEntityCode: null,
        basePrice: null,
        costPrice: null,
        salesQuantity: null,
        giftQuantity: null,
        zeroPriceItemCount: null,
        actualQuantity: null,
        actualAmount: null,
        salesAmount: null,
        salesCost: null,
        actualCost: null,
        salesGrossProfit: null,
        salesGrossMarginRate: null,
        paidAmount: null,
        dueAmount: null,
        salePrice: null,
        basicAmount: null,
        returnQuantity: null,
        actualReturnQuantity: null,
        returnAmount: null,
        returnCost: null,
        actualReimbursementCost: null,
        actualWithdrawAmount: null,
        freightIncome: null,
        shippingFeeRevenueAllocation: null,
        freightExpense: null,
        freightExpenseAllocation: null,
        discountAmount: null,
        orderWeight: null,
        orderItemWeight: null,
        storeLocation: null,
        orderSource: null,
        noteTag: null,
        otherPrice1: null,
        otherPrice2: null,
        otherPrice3: null,
        otherPrice4: null,
        otherPrice5: null,
        otherAttribute1: null,
        otherAttribute2: null,
        otherAttribute3: null,
        otherAttribute4: null,
        otherAttribute5: null,
        shopId: null,
        onlineProductName: null,
        combinedProductCode: null,
        orderSubId: null,
        warehouseOrderNumber: null,
        couponName: null,
        productWeight: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
    };
  },
  created() {
    this.getList();
  },
  methods: {
    //搜索栏展示与收起
    shouqi() {
      // console.log(1);
      this.isOpen = !this.isOpen;
    },
    /** 查询原始订单数据列表 */
    getList() {
      this.loading = true;
      listJstOrigOrderDwd(this.queryParams).then((response) => {
        this.JstOrigOrderDwdList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        internalOrderNumber: null,
        tagMultilabel: null,
        saleOrderNumber: null,
        orderType: null,
        orderId: null,
        externalOrderId: null,
        orderStatus: null,
        shipmentWarehouse: null,
        virtualStock: null,
        isPreSaleItem: null,
        distributor: null,
        storeName: null,
        flag: null,
        buyerAccount: null,
        buyerId: null,
        buyerMessage: null,
        sellerNote: null,
        orderDate: null,
        shippingDate: null,
        paymentDate: null,
        confirmationDate: null,
        supplyPaymentTime: null,
        salesRepresentativeId: null,
        receiverName: null,
        province: null,
        cityName: null,
        regionCounty: null,
        expressCompany: null,
        trackingNumber: null,
        saleAfterRegistrationDate: null,
        serviceConfirmDate: null,
        saleAfterServiceEntryDate: null,
        salesAfterServiceWarehouseOrderNumber: null,
        afterSalesCategory: null,
        issueType: null,
        productCode: null,
        styleCode: null,
        originalOrderId: null,
        virtualCategory: null,
        productCategory: null,
        brand: null,
        productShortName: null,
        productName: null,
        colorSpecification: null,
        onlineColorSpecification: null,
        supplierName: null,
        supplierId: null,
        supplierProductCode: null,
        storeProductCode: null,
        combinationEntityCode: null,
        basePrice: null,
        costPrice: null,
        salesQuantity: null,
        giftQuantity: null,
        zeroPriceItemCount: null,
        actualQuantity: null,
        actualAmount: null,
        salesAmount: null,
        salesCost: null,
        actualCost: null,
        salesGrossProfit: null,
        salesGrossMarginRate: null,
        paidAmount: null,
        dueAmount: null,
        salePrice: null,
        basicAmount: null,
        returnQuantity: null,
        actualReturnQuantity: null,
        returnAmount: null,
        returnCost: null,
        actualReimbursementCost: null,
        actualWithdrawAmount: null,
        freightIncome: null,
        shippingFeeRevenueAllocation: null,
        freightExpense: null,
        freightExpenseAllocation: null,
        discountAmount: null,
        orderWeight: null,
        orderItemWeight: null,
        storeLocation: null,
        orderSource: null,
        noteTag: null,
        otherPrice1: null,
        otherPrice2: null,
        otherPrice3: null,
        otherPrice4: null,
        otherPrice5: null,
        otherAttribute1: null,
        otherAttribute2: null,
        otherAttribute3: null,
        otherAttribute4: null,
        otherAttribute5: null,
        shopId: null,
        onlineProductName: null,
        combinedProductCode: null,
        orderSubId: null,
        warehouseOrderNumber: null,
        couponName: null,
        productWeight: null,
        createTime: null,
        updateTime: null,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加原始订单数据";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids;
      getJstOrigOrderDwd(id).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "修改原始订单数据";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.id != null) {
            updateJstOrigOrderDwd(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addJstOrigOrderDwd(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal
        .confirm('是否确认删除原始订单数据编号为"' + ids + '"的数据项？')
        .then(function () {
          return delJstOrigOrderDwd(ids);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "jst/JstOrigOrderDwd/export",
        {
          ...this.queryParams,
        },
        `JstOrigOrderDwd_${new Date().getTime()}.xlsx`
      );
    },
    //部门文件导入修改打开
    daoru() {
      this.dialogVisible = true;
    },
    // 打开加载层
    openUploadLoading() {
      this.$modal.loading("正在导入，请稍候！");
    },
    //文件导入成功回传

    handlePictureSuccessPic(res, file) {
      //   this.$refs.daoru.clearFiles(); //去掉文件列表
      this.$modal.closeLoading();
      console.log(JSON.stringify(res));
      //设置图片访问路径 （url 后台传过来的的上传地址）
      // this.picUrl = file.response.url;
      // const url = file.response.fileName;
      this.file = file.response.url;
      console.log(JSON.stringify(this.file));
      if (res.code == 200) {
        this.dialogVisible = false;

        this.$modal.msgSuccess(res.msg);
        // if (res.msg == "操作成功") {
        //   this.$modal.msgSuccess("导入成功");
        // } else {
        //   this.$modal.msgError(res.msg);
        // }
        this.getList();
        // return true
      } else {
        this.$modal.msgError(res.msg);
        this.dialogVisible = true;
        // this.$message.msgError('该颜色未在字典定义')
        return;
      }
    },
    //图片预览
    handlePictureCardPreview(file) {
      // this.picUrl = file.url
      // this.imageUrl = file.url;
      // this.dialogVisible = true;
    },
    //图片上传前的相关判断
    beforeAvatarUpload(file) {
      // const isJPG = file.type == 'image/jpeg' || file.type == 'image/png';
      const isLt2M = file.size / 1024 / 1024 < 100;
      // if (!isJPG) {
      //     this.$message.error('上传头像图片只能是 JPG/PNG 格式!');
      // }
      if (!isLt2M) {
        this.$message.error("上传头像图片大小不能超过 100MB!");
      }
      this.openUploadLoading();
      return isLt2M;
    },

    // 文件个数超出
    handleExceed() {
      this.$modal.msgError(`上传链接文件数量不能超过 ${this.limit} 个!`);
    },
    // 上传文件让第二次覆盖第一的文件
    changeFile1(file, fileList) {
      if (fileList.length > 1) {
        this.fileLi = fileList.slice(-1);

        // this.fileList = [fileList[fileList.length - 1]]//这一步，是 展示最后一次选择文件
      }
      // this.fileSpecial = fileList;
    },
  },
};
</script>
